[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 setusercharsize()       Set Width and Height Ratio for Stroked Fonts

 #include   <graphics.h>

 void far   setusercharsize(multx,divx,multy,divy);
 int        multx;
 int        divx;
 int        multy;
 int        divy;

    setusercharsize() allows you to modify the character height and width
    of stroked fonts.  The values in setusercharsize() will only be
    recognized if settextstyle() is called first with 'charsize' set to 0
    (USER_CHAR_SIZE is defined as 0 in <graphics.h>).

    Returns:    Nothing.

   -------------------------------- Example ---------------------------------

    The following statements print a scaled message inside an ellipse.

           #include <graphics.h>
           #include <conio.h>

           main()
           {
               int gdriver = DETECT;
               int gmode;
               char *msg = "Mother's Day";

               initgraph(&gdriver,&gmode,"");
               settextjustify(CENTER_TEXT,CENTER_TEXT);
               settextstyle(GOTHIC_FONT,HORIZ_DIR,USER_CHAR_SIZE);
               setusercharsize(200,textwidth(msg),100,textheight(msg));
               settextstyle(GOTHIC_FONT,HORIZ_DIR,USER_CHAR_SIZE);
               ellipse(320,160,0,360,125,75);
               outtextxy(320,150,msg);
               getch();
               closegraph();
           }


See Also: gettextsettings() settextjustify() settextstyle()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson